<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="/static/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript">
		var postlocationLink=function(id,url,jumpLink,jump200,verify_code_img){
				$(id).children(":submit").attr("disabled","disabled");
				$.post(url, $(id).serialize(), function(data) {
					if (data.code == 200) {
						if(jump200==true){
							alert(data.msg);
						}
						if(jumpLink.indexOf("?")>-1){
							jumpLink = jumpLink+"&_t="+Math.random();
						}else{
							jumpLink= jumpLink+"?_t="+Math.random();
						}
						window.location = jumpLink;
					} else if (data.code == 201) {
							alert(data.msg);
							jumpLink=data.data;
						if(jumpLink.indexOf("?")>-1){
							jumpLink = jumpLink+"&_t="+Math.random();
						}else{
							jumpLink= jumpLink+"?_t="+Math.random();
						}
						window.location = jumpLink;
					} else {
						alert(data.code + ":" + data.msg);
						if (data.code == 405) {
							$(verify_code_img).click();
						}
					}
					$(id).children(":submit").removeAttr("disabled");
				}, "json");
 		}
 		
 		var postDataParameter=function(url,dataParameter,jumpLink,jump200){
				$.post(url,dataParameter, function(data) {
					if (data.code == 200) {
						if(jump200==true){
							alert(data.msg);
						}
						if(jumpLink.indexOf("?")>-1){
							jumpLink = jumpLink+"&_t="+Math.random();
						}else{
							jumpLink= jumpLink+"?_t="+Math.random();
						}
						window.location = jumpLink;
					} else {
						alert(data.code + ":" + data.msg);
					}
				}, "json");
 		}
</script>